package com.xyyhome.web.love.domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_l_dynamic_view", schema = "xyyhome", catalog = "")
public class YLDynamicView {
    private String yldvId;
    private String yldvDynamicId;
    private String yldvUserId;
    private Timestamp yldvCreateTime;
    private Byte yldvState;

    @Id
    @Column(name = "yldv_id", nullable = false, length = 36)
    public String getYldvId() {
        return yldvId;
    }

    public void setYldvId(String yldvId) {
        this.yldvId = yldvId;
    }

    @Basic
    @Column(name = "yldv_dynamic_id", nullable = true, length = 36)
    public String getYldvDynamicId() {
        return yldvDynamicId;
    }

    public void setYldvDynamicId(String yldvDynamicId) {
        this.yldvDynamicId = yldvDynamicId;
    }

    @Basic
    @Column(name = "yldv_user_id", nullable = true, length = 36)
    public String getYldvUserId() {
        return yldvUserId;
    }

    public void setYldvUserId(String yldvUserId) {
        this.yldvUserId = yldvUserId;
    }

    @Basic
    @Column(name = "yldv_create_time", nullable = true)
    public Timestamp getYldvCreateTime() {
        return yldvCreateTime;
    }

    public void setYldvCreateTime(Timestamp yldvCreateTime) {
        this.yldvCreateTime = yldvCreateTime;
    }

    @Basic
    @Column(name = "yldv_state", nullable = true)
    public Byte getYldvState() {
        return yldvState;
    }

    public void setYldvState(Byte yldvState) {
        this.yldvState = yldvState;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YLDynamicView that = (YLDynamicView) o;

        if (yldvId != null ? !yldvId.equals(that.yldvId) : that.yldvId != null) return false;
        if (yldvDynamicId != null ? !yldvDynamicId.equals(that.yldvDynamicId) : that.yldvDynamicId != null)
            return false;
        if (yldvUserId != null ? !yldvUserId.equals(that.yldvUserId) : that.yldvUserId != null) return false;
        if (yldvCreateTime != null ? !yldvCreateTime.equals(that.yldvCreateTime) : that.yldvCreateTime != null)
            return false;
        if (yldvState != null ? !yldvState.equals(that.yldvState) : that.yldvState != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = yldvId != null ? yldvId.hashCode() : 0;
        result = 31 * result + (yldvDynamicId != null ? yldvDynamicId.hashCode() : 0);
        result = 31 * result + (yldvUserId != null ? yldvUserId.hashCode() : 0);
        result = 31 * result + (yldvCreateTime != null ? yldvCreateTime.hashCode() : 0);
        result = 31 * result + (yldvState != null ? yldvState.hashCode() : 0);
        return result;
    }
}
